In a clustered database system, multiple “nodes” may have access to the same on-disk copy of a database. Typically, each node is a computing device with its own local memory and processors that are running one or more database instances. The database server instances on each of the nodes may request access to the database in order to read or modify database data.
If a node fails, one or more of the surviving nodes performs failure recovery. In a database system, this may entail redoing or undoing certain changes to the database system. A redo log is scanned to determine which changes need to be redone or undone and how to redo or undo the changes.
A redo log contains redo records. Redo records record changes to a unit of data in a database (e.g. a row, a data block that stores rows) A redo record contains enough information to reproduce a change between a version of the unit of data previous to a change and a version of the unit of data subsequent to the change.
During failure recovery, much of the database is locked. Normal access to the database by the surviving nodes is prevented until it can be determined which units of data have changes that may need to redone or undone. Once this set is determined, the database is unlocked and normal access to unit of data that are not in the set is permitted.
Because the database is locked until the completion of the process of determining the set of units of data that have changes that need to be redone or undone, the completion of this process delays the full availability of the database system. Constant and complete availability of a database system is a critical feature of a multi-node database system. Therefore, there is a need to reduce the time is takes to determine the set of units of data that have changes to be redone or undone.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.